week 1 solution of data structures and algorithms using python